package com.micro.modual.extension;

import com.micro.common.MicroConstant;
import com.micro.common.biz.GeneratorCodeUtil;
import com.micro.common.util.SnowFlakeUtil;
import com.micro.modual.entity.SeckillNotice;
import com.micro.modual.model.bo.seckillnotice.SeckillNoticeBO;

/**
 * <h1>秒杀通知表 延展类</h1>
 *
 * @author LevelCoder
 * @version V1.0.0
 * @email LevelCoder@126.com
 * @date 2020-08-04 00:23:26
 */
public class SeckillNoticeExtension {

    /**
     * <h2>转换: 秒杀通知表 新增</h2>
     *
     * @param seckillNoticeBO {@link SeckillNoticeBO} 秒杀通知表 新增/修改 请求对象
     * @return {@link SeckillNotice} 秒杀通知表
     */
    public static SeckillNotice converAddSeckillNotice(SeckillNoticeBO seckillNoticeBO) {
        SeckillNotice seckillNotice = new SeckillNotice();
        seckillNotice.setId(SnowFlakeUtil.getId());
        return seckillNotice;
    }

    /**
     * <h2>转换: 秒杀通知表 修改</h2>
     *
     * @param seckillNoticeBO {@link SeckillNoticeBO} 秒杀通知表 新增/修改 请求对象
     * @return {@link SeckillNotice} 秒杀通知表
     */
    public static SeckillNotice converEditSeckillNotice(SeckillNoticeBO seckillNoticeBO) {
        SeckillNotice seckillNotice = new SeckillNotice();
        seckillNotice.setId(seckillNoticeBO.getId());
        return seckillNotice;
    }
}
